﻿using RXY_Mall.Application.Finance.Dto;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace RXY_Mall.Application.Finance
{
    public interface IFinanceService
    {
        #region 资金
        IList<SettlementDto> GetSettlementByPage(int iDisplayStart, int iDisplayLength, string dateMin, string dateMax, int status, string orderNo, int shopId, out int totalCount);
        IList<FinanceLogDto> GetFinanceLogByPage(int iDisplayStart, int iDisplayLength, string dateMin, string dateMax, int type, int in_out, int shopId, out int totalCount);
        IList<FinanceReturnDto> GetFinanceReturnByPage(int iDisplayStart, int iDisplayLength, string dateMin, string dateMax, int type, int shopId, out int totalCount);
        SettlementDto GetSettlementById(int id);
        FinanceLogDto GetFinanceLogById(int id);
        FinanceReturnDto GetFinanceReturnById(int id);
        Task SettlementCheck(int shopId=0);
        Task SettlementDeal(int shopId = 0);
        Task SettlementReturn(int shopId = 0);
        //店铺特性/资金
        ShopPropertyDto GetShopBalances(int shopId);
        #endregion
        #region 店铺提现
        IList<WithdrawalDto> GetWithdrawalByPage(int iDisplayStart, int iDisplayLength, string dateMin, string dateMax,string code, int status, int shopId, out int totalCount);
        Task<Response<bool>> ApplyWithdraw(int managerId, int shopId, decimal money, string password);
        WithdrawalDto GetWithdrawalById(int id);
        #endregion
        /// <summary>
        /// 获取系统参数type=1会员提现费率 2商家提现费率 3发货T日
        /// </summary>
        /// <param name="type">1会员提现费率 2商家提现费率 3发货T日</param>
        /// <returns></returns>
        decimal GetParam(int type);
        #region 资金统计
        //可用资金
        decimal GetBalance(int shopId);
        //提现中金额
        decimal GetWithdrawaling(int shopId);
        //累计提现金额
        decimal GetWithdrawal(int shopId);
        //待结算金额
        decimal GetSettlementing(int shopId);
        //订单
        decimal GetOrdersNumber(int shopId, int status);
        //商品数量
        decimal GetGoodsNumber(int shopId, int isPublish);

        #endregion

        //商家订单统计
        OrderStatisticsDto GetOrderTotal( int shopId);
    }
}
